home *** CD-ROM | disk | FTP | other *** search
/ Openstep 4.2 (Developer) / Openstep Developer 4.2.iso / NextDeveloper / OpenStepConversion / IntermediateFrameworks1 / AppKit.framework / Headers / NSDataLink.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-29  |  2.4 KB  |  96 lines

  1. /*
  2.     NXDataLink
  3.     Application Kit, Release 3.0
  4.     Copyright (c) 1991, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import <Foundation/Foundation.h>
  8. #import <objc/hashtable.h>
  9. #import "NSPasteboard.h"
  10. #import <sys/types.h>
  11. #import "NSSelection.h"
  12. @class NSDataLinkManager;
  13.  
  14. typedef enum _NXDataLinkUpdateMode {
  15.     NSUpdateContinuously = 1,
  16.     NSUpdateWhenSourceSaved = 2,
  17.     NSUpdateManually = 3,
  18.     NSUpdateNever = 4
  19. } NSDataLinkUpdateMode;
  20.  
  21. typedef enum _NXDataLinkDisposition {
  22.     NSLinkInDestination = 1,
  23.     NSLinkInSource = 2,
  24.     NSLinkBroken = 3
  25. } NSDataLinkDisposition;
  26.  
  27. extern NSString * NSDataLinkPboardType;
  28.  
  29. /* A persistent identifier of links on the destination side. Never 0. */
  30. typedef int NSDataLinkNumber;
  31.  
  32. /* filename suffix used for saved links */
  33. extern NSString * NSDataLinkFilenameExtension;
  34.  
  35. @interface NSDataLink : NSObject {
  36.   /* these instance variables are NOT part of the API, are subject to change in future releases */
  37.   @private
  38.     NSSelection *srcSelection;
  39.     id srcFile;
  40.     char *srcAppName;
  41.     id srcMgr;
  42.     NSSelection *destSelection;
  43.     char *destFileName;
  44.     char *destAppName;
  45.     id destMgr;
  46.     time_t lastUpdateTime;
  47.     NSDataLinkNumber linkNum;
  48.     struct _dlFlags {
  49.     unsigned int dirty:1;
  50.     unsigned int memorable:1;
  51.     unsigned int mode:2;
  52.     unsigned int canUpdateContinuously:1;
  53.     unsigned int updateMode:4;
  54.     unsigned int appVerifiesLinks:1;
  55.     unsigned int willOpenSource:1;
  56.     unsigned int willUpdate:1;
  57.     unsigned int dead:1;
  58.     unsigned int cyclical:1;
  59.     unsigned int RESERVED:2;
  60.     } dlFlags;
  61.     NSString * *types;
  62.     unsigned int _reservedDataLink1;
  63. }
  64.  
  65. - initLinkedToSourceSelection:(NSSelection *)selection managedBy:linkManager supportingTypes:(NSArray *)newTypes;
  66. - initLinkedToFile:(NSString *)filename;
  67. - initFromPasteboard:(NSPasteboard *)pasteboard;
  68. - initFromFile:(NSString *)filename;
  69. - copyFromZone:(NSZone *)zone;
  70.  
  71. - writeToPasteboard:(NSPasteboard *)pasteboard;
  72. - writeToFile:(NSString *)filename;
  73.  
  74. - saveLinkIn:(NSString *)directoryName;
  75.  
  76. - (NSArray *)types;
  77. - (NSSelection *)sourceSelection;
  78. - (NSSelection *)destinationSelection;
  79. - (NSString *)sourceFilename;
  80. - (NSString *)destinationFilename;
  81. - (NSString *)sourceAppName;
  82. - (NSString *)destinationAppName;
  83. - (NSDataLinkManager *)manager;
  84. - (time_t)lastUpdateTime;
  85. - (NSDataLinkNumber)linkNumber;
  86. - (NSDataLinkDisposition)disposition;
  87.  
  88. - updateDestination;
  89. - openSource;
  90. - break;
  91. - setUpdateMode:(NSDataLinkUpdateMode)mode;
  92. - (NSDataLinkUpdateMode)updateMode;
  93. - sourceEdited;
  94.  
  95. @end
  96.